package lemna.top.chunyu.batch.step1;

import java.util.List;

import org.springframework.batch.item.ItemWriter;
import org.springframework.beans.factory.annotation.Autowired;

import lemna.top.chunyu.batch.step1.domain.ChunYuPaymentStatement;
import lemna.top.chunyu.batch.step1.repo.ChunYuRepo;


public class Step1Writer implements ItemWriter<ChunYuPaymentStatement> {
	@Autowired
	ChunYuRepo repo;

	@Override
	public void write(List<? extends ChunYuPaymentStatement> items) throws Exception {
		for (ChunYuPaymentStatement t : items) {
			repo.save(t);
		}

	}
}